package com.qcu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qcu.dto.chart.HotProduct;
import com.qcu.entity.OrderInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author MyComputer
* @description 针对表【order_info】的数据库操作Mapper
* @createDate 2025-04-09 09:41:25
* @Entity com.qcu.entity.OrderInfo
*/
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    @Select("select p.content from order_info o\n" +
            "\tleft join payment_info p on o.order_no = p.order_no \n" +
            "where o.inhabitant_id = #{inhabitantId}")
    List<String> getExamInfo(String inhabitantId);

    @Select("select title , count(title) as count from order_info group by title limit 10")
    List<HotProduct> getHotProduct();
}




